package com.itheima_31;

public class IntegerDemo {
    public static void main(String[] args) {
        System.out.println(Integer.MIN_VALUE);
        System.out.println(Integer.MAX_VALUE);

//        Integer i1 = new Integer(100); // 废弃的方法
//        System.out.println(i1);

//        Integer i2 = new Integer("200");
//        System.out.println(i2);

//        Integer i3 = new Integer("abc");
//        System.out.println(i3);

        Integer i4 = Integer.valueOf(100);
        System.out.println(i4);

        Integer i5 = Integer.valueOf("200");
        System.out.println(i5);

        int number = 100;
        String s1 = "" + number;
        System.out.println(s1);

        System.out.println(String.valueOf(number));


        String s3 = "200";
        Integer is3 = Integer.valueOf(s3);
        System.out.println(is3.intValue());

        System.out.println(Integer.parseInt(s3));
    }
}
